from django.test import TestCase
import os


def main():
    """Run administrative tasks."""
    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'exam_sys.settings.dev')
    import django
    django.setup()
    # from user.models import Userinfo
    # from paper.models import Paper, StudentPaper, StudentAnswer
    # user = Userinfo.objects.filter(pk=1).first()
    # student_paper = StudentPaper.objects.filter(student=user).first()  # 学生答卷
    # blank_paper = student_paper.paper  # 空白试卷
    # topic = blank_paper.topic_set.all().first()  # 大标题
    # title = topic.title.all().first()  # 小题
    # options = title.option_set.all()
    # print(options)
    # res = student_paper.studentanswer_set.all().first()
    # print(res.content)
    from django.core.cache import cache
    cache.set('name', 'jason')


if __name__ == '__main__':
    main()
